<?php
		include("dbconn.inc");
		include("dbfuc.inc");
		include("session.inc");		
		$user=$_SESSION["user"];
		$curid=$_SESSION["curid"];
		
	if(session_is_registered("user") )
	{
	
?>
<html>
<head>
<title>Untitled Document</title>
<style type="text/css">
<!--
.style11 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #999999; }
.style12 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style14 {font-size: 12px}
.style15 {color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 12px; }
.style16 {color: #000000}
.style6 {	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.style9 {color: #184584}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<?php
		if(($user!="") && (($curid!="") || ($curid!=0)))
		{
			$sql="";
?>		
<?php include "allheader.php"  ?>	
<?php	
		//echo $user;
		$sql="select D_JOIN,d_expiry,c_fname from mlm_master b ,mlm_address_dtl a  where b.pn_id=a.n_id and pn_id=$curid ";
		$result=mysql_query($sql);
		$rownum=mysql_num_rows($result);
		if($rownum >0)
		{
			$rownum=$rownum-1;
			$joindate=mysql_result($result,$rownum,"D_JOIN");
			$expiredate=mysql_result($result,$rownum,"d_expiry");
			$c_fname=mysql_result($result,$rownum,"c_fname");
			
		}

		}

?> 
<table id="Table_01" width="1003" height="408" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td rowspan="3"><img src="images/footer_01.jpg" width="42" height="325" alt=""></td>
    <td height="337" background="images/footer_02.jpg"><img src="images/footer_02.jpg" width="3" height="286" alt=""></td>
    <td colspan="8"><table width="487" height="195" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
      <tr>
        <td width="487" height="195" colspan="4" valign="top"><br />
              <table width="100%" border="0" cellspacing="0" cellpadding="6" align="left" height="0">
                <tr valign="top">
                  <td height="0"><div align="left"> <span class="styleN style9"><strong>Welcome <?php echo $c_fname ?></strong></span></div></td>
                </tr>
                <tr >
                  <td><hr width="100%" align="left" color="#FF0000"  size="1"></td>
                </tr>
                <tr valign="top">
                  <td height="133"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" >
                      <tr >
                        <td bgcolor="#59C3ED" class="texture  style12 style14 style16">&nbsp;</td>
                        <td bgcolor="#59C3ED" class="texture">&nbsp;</td>
                        <td bgcolor="#59C3ED" class="texture   style12 style14 style16">&nbsp;</td>
                      </tr>
                      <tr >
                        <td width="168" bgcolor="#59C3ED" class="texture  style12 style14 style16">Username</td>
                        <td width="9" bgcolor="#59C3ED" class="texture"><div align="center" class="style15">:</div></td>
                        <td width="389" bgcolor="#59C3ED" class="texture   style12 style14 style16"><?php echo $user ?></td>
                      </tr>
                      <tr class="texture">
                        <td bgcolor="#59C3ED" class="texture  style12 style14 style16">Date of join </td>
                        <td bgcolor="#59C3ED" class="texture"><div align="center" class="style15">:</div></td>
                        <td bgcolor="#59C3ED" class="texture  style12 style14 style16"> <?php echo $joindate ?></td>
                      </tr>
                      <tr>
                        <td bgcolor="#59C3ED" class="texture   style12 style14 style16">Date of renewal </td>
                        <td bgcolor="#59C3ED" class="texture"><div align="center" class="style15">:</div></td>
                        <td bgcolor="#59C3ED" class="texture  style12 style14 style16"><?php echo $expiredate ?></td>
                      </tr>
                      <tr>
                        <td bgcolor="#59C3ED" class="texture style6">&nbsp;</td>
                        <td bgcolor="#59C3ED" class="texture">&nbsp;</td>
                        <td bgcolor="#59C3ED" class="texture  style6">&nbsp;</td>
                      </tr>
                  </table></td>
                </tr>
              </table>
          <br />
              <br /></td>
      </tr>
    </table>
        <br>
        <br>
        <table width="96%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="34%"><div align="left" class="style11">Login Information </div></td>
          </tr>
          <tr>
            <td><hr align="left" width="30%" size="1" color="#FF0000" ></td>
          </tr>
          <tr>
            <td><span class="style11">Today : <%=lltym%></span></td>
          </tr>
          <tr>
            <td><span class="style11">Last Login : <%=ltym%></span></td>
          </tr>
      </table></td>
    <td background="images/footer_04.jpg"><img src="images/footer_04.jpg" width="4" height="286" alt=""></td>
    <td rowspan="3"><img src="images/footer_05.jpg" width="54" height="325" alt=""></td>
  </tr>
  <tr>
    <td colspan="3" rowspan="2"><img src="images/footer_06.jpg" width="36" height="39" alt=""></td>
    <td rowspan="2"><img src="images/footer_07.jpg" width="9" height="39" alt=""></td>
    <td rowspan="2"><img src="images/footer_08.jpg" width="178" height="39" alt=""></td>
    <td colspan="3"><img src="images/footer_09.jpg" width="662" height="12" alt=""></td>
    <td><img src="images/footer_10.jpg" width="18" height="12" alt=""></td>
    <td><img src="images/footer_11.jpg" width="4" height="12" alt=""></td>
  </tr>
  <tr>
    <td><img src="images/footer_12.jpg" width="12" height="27" alt=""></td>
    <td><img src="images/footer_13.jpg" width="88" height="27" alt=""></td>
    <td><img src="images/footer_14.jpg" width="562" height="27" alt=""></td>
    <td colspan="2"><img src="images/footer_15.jpg" width="22" height="27" alt=""></td>
  </tr>
  <tr>
    <td><img src="images/footer_16.jpg" width="42" height="31" alt=""></td>
    <td colspan="2"><img src="images/footer_17.jpg" width="15" height="31" alt=""></td>
    <td colspan="8"><img src="images/footer_18.jpg" width="892" height="31" alt=""></td>
    <td><img src="images/footer_19.jpg" width="54" height="31" alt=""></td>
  </tr>
  <tr>
    <td><img src="images/spacer.gif" width="42" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="3" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="12" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="21" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="9" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="178" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="12" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="88" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="562" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="18" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="4" height="1" alt=""></td>
    <td><img src="images/spacer.gif" width="54" height="1" alt=""></td>
  </tr>
</table>
</body>
</html>
<?php
	}
	else
	{
		$errormsg="Your session is expeired. Please login again.";
		header("location: index.php?error=$errormsg");
	}
?>	
